<?php
function afficheMenu($piece)
{
	if(count($piece) != 0)
	{
		echo "<ul id='listemenu'>";
			
		foreach ($piece AS $cle => $val)
		{
			echo "<li><button id='bouton" .$val->ID. "' onClick='afficheEquipement(" .$val->ID. ")'>" .$val->nom. "</button></li>";
		}
			
		echo "</ul>";
	}

}
?>